/*
 * @Author: lei
 * @Date: 2021-08-02 16:01:23
 * @LastEditTime: 2021-08-02 16:55:14
 * @LastEditors: Please set LastEditors
 * @Description: 测试static变量和static函数的作用域
 * @FilePath: /code/static2.cpp
 */

#include <iostream>
//extern int a;发生链接错误
extern int c;//可以使用
using namespace std;
extern void func();
//extern void func1();
int main()
{
    func();
    //func1();//链接器错误，不能跨文件使用static全局函数
    //cout<<"a= "<<a<<endl;
    cout<<"c= "<<c<<endl;
    return 0;
}
//g++ -o static2 static2.cpp static1.cpp